	/* 倒计时模块 */
	$.fn.extend({
		signIn:function(properties){

			/*var s=properties.start;
			var c=Math.floor((oDate.getTime()/1000));
			var tg0=0;
			if(s>c){
				return;	
			}else{
				tg0=properties.end-c;
			}*/
			var tg0=0;
			if(properties.seTime)
			{
				tg0=properties.seTime;
		
			}
			else
			{
				tg0=properties.end-properties.start;
			}
			
			if(tg0>=0){
				var dd=parseInt(tg0/(24*3600));
				var hh=parseInt(tg0%(24*3600)/3600);
				hh=hh<10?'0'+hh:hh;
				hh=hh+'';
				var hf = hh.substr(0,1);
				var hs = hh.substr(1);
				var mm=parseInt(tg0%3600/60);
				mm=mm<10?'0'+mm:mm;
				mm=mm+'';
				var mf = mm.substr(0,1);
				var ms = mm.substr(1);
				var ss=parseInt(tg0%60);
				ss=ss<10?'0'+ss:ss;
				ss=ss+'';
				var sf = ss.substr(0,1);
				var ns = ss.substr(1);
				var nub10 = 10;
				var setIds=0;
				$(this).html(properties.str+(dd==0?"":"<span>"+dd+"</span>天")+"<span>"+hh+"</span>时<span>"+mm+"</span>分<span>"+ss+"</span>秒");
				
				/*$("#fourday_time").html("<em>"+hf+""+hs+"</em><em>"+mf+""+ms+"</em><em>"+sf+""+ns+"</em><em id='msc'>"+0+""+0+"</em>");
				clearInterval(setIds);
				
				setIds = setInterval(function(){
					nub10--;
					var stttw = nub10<10 ? '0'+nub10 : nub10+"";
					var msc1 = stttw.substring(0,1);
					var msc2 = stttw.substring(1,2);
					nub10=parseInt(nub10);
					if(nub10 == -1){
						clearInterval(setIds);
						return;
					}
					$("#msc").html(msc1+""+msc2);
				},98);*/
			}else{
			}
		  }
		});
	
	function Userobj(id,curTime,startTime,jgTime,cost,cost_old){

		this.id=id;
		this.curTime=curTime;
		this.startTime=startTime;
		this.jgTime=jgTime;
		this.cost=cost;
		this.cost_old=cost_old;
		
	}
	Userobj.prototype={
		changeTime:function(){
			
			var s=this.curTime;
			var e=this.startTime;

			var e1=this.jgTime;
			var This=this;
			
			this.timer=setInterval(function(){
				
				s++;
				
				/*var oDate=new Date();
				var c=Math.floor((oDate.getTime()/1000));*/

				if(s<e){
					var obj={};
						
					obj.start=s;
					obj.end=e;
					obj.str='距活动开始:';

					$('#'+This.id).signIn(obj);
				}else if(s>=e&&e1>0){
					
					var obj={};
					e1--;
					obj.seTime=e1;
					obj.str='距活动结束:';
					
					$('#'+This.id).parent().parent().parent().find('.cost').html('<span attr=activePrice>'+This.cost+'</span>');
					$('#'+This.id).parent().siblings('.shop_mid_page').find('span[attr=activePrice]').text(This.cost);
					
					$('#'+This.id).signIn(obj);
				}else if(s>=e&&e1<=0){
					clearInterval(This.timer);
					$('#'+This.id).parent().parent().parent().find('.cost').html('<span attr=activePrice>'+This.cost_old+'</span>');
					$('#'+This.id).parent().siblings('.shop_mid_page').find('span[attr=activePrice]').text(This.cost_old);
					$('#'+This.id).text('活动结束')	;
				}
			},1000);	
		}	
	};
	/* 倒计时模块end */